// ============================== 导入依赖 ============================== //

// ============================== 导出异步调用 ============================== //

export default {
  // —————————————————————————————— 结构树 —————————————————————————————— //

  async remoteTree({ state: { API }, rootState, rootGetters: { GETTER } }) {
    const { statisticType, energyType } = rootState.param
    if (statisticType === 5) return

    const treeParam = { energyCategory: statisticType, energyType, pageSize: 10000 }
    const TIP = API.transTip(`查询${GETTER.word}设置`, rootState.API)
    const [, arr] = await API.getList(treeParam, TIP)
    return API.transTree(arr)
  },
}
